package com.hzye.framework.common.vo;

/*******************************************************************************
 * @功能
 * @作者 HuangBin
 * @创建日期 2012-1-14
 * @版本 V1.0
 */
public class ResultVO {

	private String msg;

	private String code;

	public ResultVO(String code, String msg) {
		this.code = code;
		this.msg = msg;
	}

	public ResultVO() {

	}
	
	/***
	 * 返回成功
	 * @param msg 成功提示信息
	 * @return
	 */
	public static ResultVO success(String msg){
		return new ResultVO(ResultCode.SUCCESS,msg);
	}
	
	/**
	 * 操作失败
	 * @param msg 失败提示信息
	 * @return
	 */
	public static ResultVO failure(String msg){
		return new ResultVO(ResultCode.FAILURE,msg);
	}
	
	public static ResultVO error(String msg){
		return new ResultVO(ResultCode.EXCEPTION,msg);
	}

	
	public static ResultVO warn(String msg){
		return new ResultVO(ResultCode.NO_PASS,msg);
	}


	public ResultVO(String code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

}
